package com.xiaohudie.thread;

import lombok.SneakyThrows;

/**
 * @Author xiao hu die
 * @Date 2022/2/21 12:16
 * @Version 1.0
 */
public class Thread08 {
    @SneakyThrows
    public static void main(String[] args) {
        Thread thread = Thread.currentThread();
        thread.getPriority();
        thread.setPriority(10);
        Thread thread1 = new Thread(new Thread8());
        thread1.start();
        thread1.join();
        System.out.println("主线程执行完毕");
    }
static class Thread8 implements Runnable{

        @Override
        public void run() {
            for (int i = 0; i <100 ; i++) {
                System.out.println(Thread.currentThread().getName() +"----->" + i);
            }
    }
}
}

